#ifdef _FULLPROGRAM

#include "kconfig.h"
#include "ksymtbl.h"
#include "klbltbl.h"
#include "kstrpool.h"
#include "kbytecode.h"

SymbolTable *symtbl = NULL;
LabelTable *lbltbl = NULL;

k_uint line;
k_uint programSize = 0;

std::map<k_string, k_uint> *symbols = NULL;

StringPool *strPool = NULL;
k_uint strPoolSize;

ByteCodeStream *bytecode;

bool hasDebugInfo;

#endif //_FULLPROGRAM

void GlobalInit()
{
#ifdef _FULLPROGRAM
	symtbl   = new SymbolTable;
	lbltbl   = new LabelTable;
	symbols  = new std::map<k_string, k_uint>;
	strPool  = new StringPool;
	bytecode = new ByteCodeStream;
#endif
}

void GlobalCleanUp()
{
#ifdef _FULLPROGRAM
	delete symtbl;   symtbl = NULL;
	delete lbltbl;   lbltbl = NULL;
	delete symbols;  symbols = NULL;
	delete strPool;  strPool = NULL;
	delete bytecode; bytecode = NULL;
#endif
}
